package MyUtil;

import javax.swing.*;
import java.sql.ResultSet;
import java.sql.SQLException;

public class JScrollUtil {
    private JScrollUtil(){
    }
    public static JScrollPane getCustomJScrollPane(ResultSet rs) throws SQLException {
        ResultSetTableModel rstm = new ResultSetTableModel(rs);
        JTable jTable = new JTable(rstm);
        JScrollPane jScrollPane = new JScrollPane(jTable);
        return jScrollPane;
    }
}
